//
//  TTaskName.m
//  iTimeline
//
//  Created by Mobioneer HV 02 on 1/14/13.
//  Copyright (c) 2013 Mobioneer Co., Ltd. All rights reserved.
//

#import "TTaskName.h"

@interface TTaskName ()
@property (weak, nonatomic) IBOutlet UITextView *txtTextView;

@end

@implementation TTaskName

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}
-(IBAction)Done:(id)sender
{
   // NSLog(@"%@",self.txtTextView.text);
    [self.delegate  returnTaskName:_txtTextView.text];
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)viewDidLoad
{
    
    [super viewDidLoad];
    self.txtTextView.text = self.tn;
    [self.txtTextView becomeFirstResponder];
    UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:self action:@selector(Done:)];
    self.navigationItem.rightBarButtonItem = addButton;
    self.navigationItem.title = @"New Task";
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewDidUnload {
    [self setTxtTextView:nil];
    [super viewDidUnload];
}
@end
